/*
 * @Author: CodeHare
 * @Date: 2023-11-30 16:45:54
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-03-10 16:29:02
 * @Description: 站点模块Tab
 */
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:yt_devops/components/app_permission/yt_bottom_navigation_bar.dart';
import 'package:yt_devops/components/app_permission/yt_tab_bar_view.dart';
import 'package:yt_devops/components/app_permission/yt_tab_view_model.dart';
import 'package:yt_devops/components/log_utils.dart';
import 'package:yt_devops/pages/site/site_setting/siet_elec_price_setting/site_mains_elec_detail/keep_aliver_wrapper.dart';
import 'package:yt_devops/pages/site/site_device_manager/site_device_manager_view.dart';
import 'package:yt_devops/pages/site/site_overview/site_overview_view.dart';
import 'package:yt_devops/pages/site/site_setting/site_setting_view.dart';
import 'package:yt_devops/pages/site/site_statis_data/site_statis_data_view.dart';
import 'package:yt_devops/pages/site/site_tab/site_tab_controller.dart';
import 'package:yt_devops/resources/resources.dart';
import 'package:yt_devops/resources/str_res_keys.dart';
import 'package:yt_devops/routers/routers.dart';
import 'package:yt_devops/styles/styles.dart';

class SiteTabView extends GetView<SiteTabController> {
  const SiteTabView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GetBuilder<SiteTabController>(
      builder: (controller) => Scaffold(
        body:
            YtTabBarView(controller.selectedIndex, controller.permissionGroups),
        bottomNavigationBar: YtBottomNavigationBar(controller.permissionGroups,
            (int index, TabController tabController, {YtTabViewModel? data}) {
          // controller.tabController = tabController;
          controller.onItemTapped(index);
        }),
      ),
    );
  }
}
